import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import RegView from '../views/RegView.vue'
import PubPage from '../views/PubPage.vue'
import MyView from '../views/MyView.vue'
import SeekView from '../views/SeekView.vue'
import BookView from '../views/BookView.vue'
import LogView from '../views/LogView.vue'
Vue.use(VueRouter)

const routes = [{
		path: '/',
		name: 'home',
		component: HomeView
	},
	{
		path: '/reg',
		name: '/reg',
		component: RegView
	},
	{
		path: '/publish',
		name: '/publish',
		component: PubPage
	},
	{
		path: '/myview',
		name: '/myview',
		component: MyView
	},
	{
		path: '/seekview',
		name: '/seekview',
		component: SeekView
	},
	{
		path: '/bookview',
		name: '/bookview',
		component: BookView
	},
	{
		path: '/Log',
		name: '/Log',
		component: LogView
	},
	{
		path: '/about',
		name: 'about',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import( /* webpackChunkName: "about" */ '../views/AboutView.vue')
	}
]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
